package cn.janescott.inner.space.shiro.util;

import org.jasypt.util.text.BasicTextEncryptor;
import org.jasypt.util.text.TextEncryptor;

/**
 * 加密解密工具类
 * Created by Scott on 2018/7/25
 */
public class JasyptUtil {

    public static void main(String[] args) {
        String source = "http://localhots:9090/id";

        TextEncryptor encryptor1 = new BasicTextEncryptor();
        ((BasicTextEncryptor) encryptor1).setPassword("scott");

        System.out.println(encryptor1.encrypt(source));

        System.out.println(encryptor1.decrypt(encryptor1.encrypt(source)));
    }
}
